Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support progressed output in blob push and blob get #1113

Merged
merged 80 commits into from
Oct 13, 2023

Conversation

qweeah
Copy link
Contributor

@qweeah qweeah commented Sep 11, 2023

What this PR does / why we need it:
This PR introduces terminal output for certain oras commands.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #893

Please check the following list:

  • Does the affected code have corresponding tests, e.g. unit test, E2E test?
  • Does this change require a documentation update?
  • Does this introduce breaking changes that would require an announcement or bumping the major version?
  • Do all new files have an appropriate license header?

@codecov-commenter
Copy link

codecov-commenter commented Sep 11, 2023

Codecov Report

Attention: Patch coverage is 81.71021% with 77 lines in your changes missing coverage. Please review.

Project coverage is 80.78%. Comparing base (20c06d6) to head (edf7ab8).
Report is 238 commits behind head on main.

Files with missing lines Patch % Lines
cmd/oras/internal/display/progress/manager.go 78.48% 13 Missing and 4 partials ⚠️
cmd/oras/root/blob/fetch.go 62.22% 11 Missing and 6 partials ⚠️
cmd/oras/internal/display/track/reader.go 73.33% 8 Missing and 4 partials ⚠️
...as/internal/display/console/testutils/testutils.go 70.00% 6 Missing and 3 partials ⚠️
cmd/oras/root/blob/push.go 68.96% 6 Missing and 3 partials ⚠️
cmd/oras/internal/display/progress/status.go 95.08% 4 Missing and 2 partials ⚠️
...d/oras/internal/display/progress/humanize/bytes.go 80.95% 3 Missing and 1 partial ⚠️
cmd/oras/internal/display/console/console.go 91.42% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1113      +/-   ##
==========================================
+ Coverage   80.06%   80.78%   +0.72%     
==========================================
  Files          57       64       +7     
  Lines        2994     3372     +378     
==========================================
+ Hits         2397     2724     +327     
- Misses        412      447      +35     
- Partials      185      201      +16     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@qweeah qweeah force-pushed the progress-bar-reader branch from 753b47e to 4c5e2f1 Compare September 12, 2023 07:06
@qweeah qweeah force-pushed the progress-bar-reader branch from 4c5e2f1 to b088f2b Compare September 12, 2023 07:06
@qweeah qweeah marked this pull request as ready for review September 21, 2023 08:28
cmd/oras/internal/display/console/console.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/console/console.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/console/console.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/console/console.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/console/console.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/progress/manager.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/progress/manager.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/progress/mark.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/progress/manager.go Show resolved Hide resolved
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
qweeah added 2 commits October 9, 2023 05:59
Signed-off-by: Billy Zha <[email protected]>
cmd/oras/internal/display/progress/humanize.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/progress/humanize.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/progress/humanize.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/progress/humanize.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/progress/status.go Show resolved Hide resolved
cmd/oras/internal/display/track/reader.go Outdated Show resolved Hide resolved
cmd/oras/internal/option/common.go Outdated Show resolved Hide resolved
cmd/oras/root/blob/fetch.go Outdated Show resolved Hide resolved
cmd/oras/root/blob/push.go Outdated Show resolved Hide resolved
qweeah added 16 commits October 10, 2023 11:45
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
cmd/oras/root/blob/push.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/progress/status.go Outdated Show resolved Hide resolved
cmd/oras/root/blob/fetch.go Outdated Show resolved Hide resolved
Copy link
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@qweeah qweeah merged commit f9bb6d8 into oras-project:main Oct 13, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show progress bar when downloading or pushing content from/to a registry
4 participants